package com.gubei.auth.common.enums;

import lombok.Getter;

/**
 * 対象削除のEnum定義
 */
@Getter
public enum IsDeletedFlagEnum {
    DELETED(1,"削除しました。"),
    UN_DELETED(0,"削除しません。");

    public int code;
    public String desc;

    IsDeletedFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeletedFlagEnum getByCode(int codeValue) {
        for (IsDeletedFlagEnum isDeletedFlagEnum : IsDeletedFlagEnum.values()) {
            if (isDeletedFlagEnum.code == codeValue) {
                return isDeletedFlagEnum;
            }
        }
        return null;
    }
}
